#include <iostream>
using namespace std;

class Base
{
	public:
		void print1()
		{
			doprint1();
		}
	private:
		virtual void doprint1()
		{
			cout << "Base::doprint1." << endl;
		}
};

class Derived : public Base
{
	private:
		virtual void doprint1()
		{
			cout << "Derived::doprint1." << endl;
		}
};

int main(int argc, char* argv[])
{
	Base b;
	b.print1();

	Derived d;
	d.print1();
}
